package com.eagle.posrole.dao.impl;

import java.util.List;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.eagle.commons.pub.IBATISDB;
import com.eagle.commons.vo.tbl_RoleQxfp;
import com.eagle.posrole.dao.RQxfpDao;

public class RQxfpDaoImpl implements RQxfpDao {
	private SqlMapClient sqlMapClient;

	public List<tbl_RoleQxfp> queryByRoleBm(String RoleBm) throws Exception {
		List<tbl_RoleQxfp> resultList = null;
		resultList = sqlMapClient.queryForList(IBATISDB.creStmId("PosRole_Tbl_RoleQxfp", "queryByRoleBm"),RoleBm);
		return resultList;
	}

	public SqlMapClient getSqlMapClient() {
		return sqlMapClient;
	}

	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}

	@Override
	public boolean addQX(tbl_RoleQxfp qx) throws Exception {
		boolean flag=false;
			if (sqlMapClient.insert(IBATISDB.creStmId("PosRole_Tbl_RoleQxfp","addQX"), qx) != null) {
				flag=true;
			}
		return flag;
	}

	@Override
	public boolean delRole(String RoleBm) throws Exception {
		boolean flag=false;
		if (sqlMapClient.delete(IBATISDB.creStmId("PosRole_Tbl_RoleQxfp","delQX"), RoleBm)!=0) {
			flag=true;
		}
		return flag;
	}

}
